package co.edu.unal.unlbs.view.bbean;

import javax.ejb.EJB;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

import co.edu.unal.unlbs.persistence.entities.Asignatura;
import co.edu.unal.unlbs.service.SubjectService;



@ManagedBean(name="SubjectBBean")
@RequestScoped
public class SubjectBBean {
	
	@EJB
	SubjectService subjectService;
	
	
	private Asignatura subject = new Asignatura();


	public Asignatura getSubject() {
		return subject;
	}


	public void setSubject(Asignatura subject) {
		this.subject = subject;
	}
	
	public String save(){
		 System.out.println("Se ha entrado a save de la asignatura");
	        this.subjectService.save(subject);
	        return "theend";
	    }
}
